]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Don't require applications to accept URIs for recent files
authorGustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
Mon, 9 Nov 2009 17:54:44 +0000 (15:54 -0200)
committerGustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
Thu, 12 Nov 2009 16:25:42 +0000 (14:25 -0200)
This should not be required, since glib correctly deals with such
applications by giving them the local gvfs path, and those
applications which do support URIs keep being able to use the URIs in
GFiles.

Based on original work by Guido Günther <agx@sigxcpu.org>.

https://bugzilla.gnome.org/show_bug.cgi?id=601287

js/misc/docInfo.js

index 021dce412bde9c600b8b3effe6bbe333f21e60a6..8123e281bc14328eb5fceecd24338b87c80f1ff1 100644 (file)
@@ -36,8 +36,8 @@ DocInfo.prototype = {
         // shorter in terms of lines of code, we are not doing so
         // because that would duplicate the work of retrieving the
         // mime type.
-
-        let appInfo = Gio.app_info_get_default_for_type(this.mimeType, true);
+        let needsUri = Gio.file_new_for_uri(this.uri).get_path() == null;
+        let appInfo = Gio.app_info_get_default_for_type(this.mimeType, needsUri);
 
         if (appInfo != null) {
             appInfo.launch_uris([this.uri], Main.createAppLaunchContext());